home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 49
/
Volume 49 - JOGO DISK .iso
/
Games
/
bloop.swf
/
scripts
/
DefineSprite_52_bloop
/
frame_1
/
DoAction.as
Wrap
Text File
|
2007-09-27
|
2KB
|
96 lines
if(!speed)
{
gotoAndStop(random(_totalframes - 2) + 1);
letters = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];
speed = random(_root.level) + 0.2 + random(20) / 100;
letternum = random(25);
lettername = letters[letternum];
letternum += 66;
_root.setFrame(this);
}
onEnterFrame = function()
{
if(_root.hud.levelmode._currentframe > 5)
{
removeMovieClip(this);
}
_root.checkFrame(this);
if(!float && !dead)
{
if(_X < 52)
{
_X++;
}
if(_X > Stage.width - 52)
{
_X--;
}
_Y = _Y + speed;
if(_Y > Stage.height)
{
_root.hud.pain.play();
removeMovieClip(this);
_root.lives -= 1;
}
if(_root.cannon.hitTest(this))
{
dead = true;
}
if(_root.bombout._currentframe > 1)
{
donttake = true;
dead = true;
}
if(!dead)
{
i = _root.depth - 50;
while(i < _root.depth + 10)
{
if(eval("_root.bullet" + i).hitTest(_X,_Y,true) && !eval("_root.bullet" + i).done)
{
this.float = true;
this.floatnum = i;
eval("_root.bullet" + i).done = true;
}
i++;
}
}
}
else if(!dead)
{
if(!takelive)
{
if(eval("_root.bullet" + floatnum).letternum != letternum)
{
_root.score += 5;
_root.word.word = "5 Points";
_root.word.gotoAndPlay("fade");
}
else
{
_root.score += 10;
_root.word.word = "Bonus (+10)";
_root.word.gotoAndPlay("bam");
}
takelive = true;
}
_X = eval("_root.bullet" + floatnum)._x;
_Y = eval("_root.bullet" + floatnum)._y;
_alpha = 60;
if(_Y <= -50)
{
removeMovieClip(this);
}
}
else if(!takepoints)
{
_root.hud.pain.play();
this.gotoAndStop(_totalframes);
if(!donttake)
{
_root.lives -= 1;
}
takepoints = true;
}
};